// SensorTesterView.h : interface of the CSensorTesterView class
//
/////////////////////////////////////////////////////////////////////////////

#pragma once
#define _ATL_USE_DDX_FLOAT
#include <atlddx.h>

#include "IGSensor.h"

class CSensorTesterView : 
	public Listener<IGSensorListener>,
	public CDialogImpl<CSensorTesterView>,
	public CWinDataExchange<CSensorTesterView>
{

public:
	CSensorTesterView(void);
public:
	float m_fltGvectorX;
	float m_fltGvectorY;
	float m_fltGvectorZ;


public:
	virtual void IGSensor_GVectorChanged(IGSensor* gSensor, GVector gVector) override;

private:
	IGSensor* gSensor;
public:
	enum { IDD = IDD_SENSORTESTER_FORM };

	BOOL PreTranslateMessage(MSG* pMsg);

	BEGIN_MSG_MAP(CSensorTesterView)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
	END_MSG_MAP()

	BEGIN_DDX_MAP(CSensorTesterView)
		DDX_FLOAT(IDC_EDIT_GVECTOR_X, m_fltGvectorX)
		DDX_FLOAT(IDC_EDIT_GVECTOR_Y, m_fltGvectorY)
		DDX_FLOAT(IDC_EDIT_GVECTOR_Z, m_fltGvectorZ)
	END_DDX_MAP()

// Handler prototypes (uncomment arguments if needed):
//	LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
//	LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
//	LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
};

